home *** CD-ROM | disk | FTP | other *** search
/ IBM InfoROM for OS/2 Beta 1995 January / IBM InfoROM for OS2 Beta 1-1995.ISO / testcert / storage / function / scsi / add / wrtsame.scr < prev    next >
Encoding:
Text File  |  1994-08-15  |  2.2 KB  |  77 lines

  1. * Writes the single block of data to the medium
  2. * multiple times.
  3.  
  4. @THREAD WRTSAME.LOG
  5. @NEWALIAS SADD SCSIADD.GRA
  6. @IMPORT SCSICOM.SCR
  7. SADD DD_OPEN
  8.  
  9. * 0=Async mode, 1=Sync mode
  10. SADD SET MODE=1
  11.  
  12. * Command completion timeout (Secs)
  13. * 0=the assigned value is the default set by the driver,
  14. * -1=the assigned value is infinite.
  15. SADD SET TIMEOUT=0
  16.  
  17. * Name for paramblock
  18. SADD SET LABEL = "READ CAPACITY"
  19.  
  20. SADD READCAPACITY
  21.  
  22. * 1 : replaces the first four bytes of the data to be written to 
  23. *     the current logical block with the logical block address of
  24. *     the block currently being written.
  25. SADD SET LOGICAL_BLOCK_DATA = 0
  26.  
  27. * 1 : replaces the first eight bytes of the data to be written to
  28. *     the current physical sector with the physical address of 
  29. *     the sector currently being written.
  30. SADD SET PHYSICAL_BLOCK_DATA = 1
  31.  
  32. * 32bit starting logical block addr
  33. SADD SET LOGICAL_BLOCK_ADDR = 60
  34.  
  35. *STARTING LOGICAL BLOCK ADDR
  36. *SADD RESPONSE $PROMPT="ENTER STARTING LOGICAL BLOCK ADDR : " $RESPONSE=LOGICAL_BLOCK_ADDR $PAUSE=15
  37.  
  38. *  0 = indicates that the logical block address field
  39. *      specifies the first logical block of the range of
  40. *      logical blocks to be operated on by this command.
  41. *  1 = indicates that the logical block address field is
  42. *      a two's complement displacement.  This -ve or +ve
  43. *      displacement shall be added to the logical block
  44. *      address last accessed on the logical unit to form the
  45. *      logical block address for this command.
  46. SADD SET ADDR_MODE=0
  47.  
  48. * Reserved - set to zero
  49. SADD SET CDB_BYTE6=0
  50.  
  51. * No. of contiguous logical blocks to be read
  52. SADD SET NUM_BLOCKS = 1
  53.  
  54. *NO. OF CONTIGOUS LOGICAL BLOCKS TO BE READ
  55. *SADD RESPONSE $PROMPT="ENTER # OF LOGICAL BLOCKS : " $RESPONSE=NUM_BLOCKS $PAUSE=15
  56.  
  57. * 1(Cache if possible),  0(Need not cache it)
  58.   SADD SET CACHE_IF_POSSIBLE = 1
  59.  
  60. * 1(Force access form media), 0(May access from cache)
  61.   SADD SET FORCE_MEDIA_ACCESS = 0
  62.  
  63. SADD SET SCATGAT = ALPHA
  64. SADD SET LABEL = "READ10"
  65. SADD READ10
  66.  
  67. * 32bit starting logical block addr
  68. SADD SET LOGICAL_BLOCK_ADDR = 65
  69.  
  70. * Name for paramblock
  71. SADD SET LABEL = "WRITE SAME"
  72.  
  73. SADD WRITE_SAME
  74.  
  75. SADD DD_CLOSE
  76.  
  77.